//
//  MessageMyOrderViewController.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/20.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "MessageMyOrderViewController.h"
#import "MessageMyOderViewModel.h"
#import "PushViewController.h"

@interface MessageMyOrderViewController ()<MessageOrderSelectDelegate>
@property (nonatomic,strong) MessageMyOderViewModel * myOrderViewModel;
@end

@implementation MessageMyOrderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    if (self.messagePType == SystemMessagePType_MyOrder) {
        self.title = @"我的订单";
    }else if (self.messagePType == SystemMessagePType_Goods){
        self.title = @"商品";
    }else{
        self.title = @"通知";
    }
    self.myOrderViewModel = [[MessageMyOderViewModel alloc] initWithViewToViewModel:self.tableView theCellType:_messagePType theSuperView:self.view];
    self.myOrderViewModel.delegate = self;
}

#pragma mark -- MessageOrderSelectDelegate
-(void)didSelectRowAtIndexPathMessage:(NSIndexPath *)mess_index{
    PushViewController * pushVc = [PushViewController new];
    [self.navigationController pushViewController:pushVc animated:YES];
}

#pragma mark --- set
-(void)setMessagePType:(SystemMessagePType)messagePType{
    _messagePType = messagePType;
}

@end
